package cn.lsnu.modules.infos.service;

import cn.lsnu.common.interfacetools.interfaceentity.Page;
import cn.lsnu.common.interfacetools.interfaceservice.BaseService;
import cn.lsnu.modules.infos.entity.InfosEntity;
import cn.lsnu.modules.infos.mapper.InfosMapper;
import cn.lsnu.utils.Global;
import cn.lsnu.utils.Guuid;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class InfosService extends BaseService<InfosEntity,InfosMapper> {
    @Override
    public void save(InfosEntity entity) throws Exception {
        entity.setInfoId(Guuid.uuid());
        entity.setInfoTime(new Date());
        super.save(entity);
    }

    @Override
    public InfosEntity get(String key) throws Exception {
        return super.get(key);
    }

    @Override
    public InfosEntity getEntity(InfosEntity entity) throws Exception {
        return super.getEntity(entity);
    }

    @Override
    public List<InfosEntity> findList(InfosEntity entity) throws Exception {
        return super.findList(entity);
    }

    @Override
    public Page<InfosEntity> findPage(InfosEntity entity) throws Exception {
        return super.findPage(entity);
    }

    @Override
    public void delete(InfosEntity entity) throws Exception {
        super.delete(entity);
    }

    @Override
    public void update(InfosEntity entity) throws Exception {
        super.update(entity);
    }
}
